package com.nuanshui.heatedloan.credit.dal.mapper;

import com.nuanshui.heatedloan.credit.form.CustomerAddressListInfoForm;
import com.nuanshui.heatedloan.credit.form.CustomerCallRecordListInfoForm;
import com.nuanshui.heatedloan.credit.model.BatchInsertAddressListResult;
import com.nuanshui.heatedloan.credit.vo.CustomerAddressListInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by wangxw on 2017/7/6.
 */
public interface CustomerAddressListMapper {


    /***
     * 批量插入通讯录
     * @param customerAddressListInfos
     */
    void batchInsertAddressList(List<CustomerAddressListInfoForm> customerAddressListInfos);

    /***
     * 获取上次批量插入是否成功
     * @param userId
     * @return
     */
    BatchInsertAddressListResult getbatchInsertAddressListResult(@Param("userId") String userId, @Param("type") int type);

    /***
     * 插入批量插入结果
     * @param batchInsertAddressListResult
     */
    void  insertBatchInsertAddressListResult(BatchInsertAddressListResult batchInsertAddressListResult);

    /***
     * 修改批量插入结果
     * @param type
     * @param isSuccess
     * @param userId
     */
    void updateBatchInsertAddressListResult(@Param("type") int type, @Param("isSuccess") int isSuccess, @Param("userId") String userId);


    /***
     * 批量插入通话记录
     * @param customerCallRecordListInfoForms
     */
    void batchInsertCustomerCallRecordList(List<CustomerCallRecordListInfoForm> customerCallRecordListInfoForms);

    /***
     * 根据用户获取通讯录
     * @param userId
     * @return
     */
    List<CustomerAddressListInfoVO> loadAddressListVOByUserId(@Param("userId") String userId);
}
